// https://www.selenium.dev/selenium/docs/api/javascript/module/selenium-webdriver/lib/actions_exports_LegacyTouchSequence.html


import { SingleInstance } from "./singleInstance"

async function run() {

    const driver = SingleInstance.create_drive();

    await driver.get("https://www.baidu.com/");

    const ele = await driver.findElement({ css: 'a[name="tj_briicon"]' });

    const actions = driver.actions();

    // 移动到 ele 暂停1s perform执行action
    await actions.move({ origin: ele }).pause(1000).perform();

    // 寻找mp3元素
    const mp3 = await driver.findElement({ css: 'a[name="tj_mp3"]' });

    // 移动到元素上
    await actions.move({ origin: mp3 }).click().perform();


}

run();